package com.example.demo.entity.constants;

import java.math.BigDecimal;

/**
 * @author liu ping
 * @description: 常量类
 * @date 2019/6/11 16:03
 */
public class CommonConstants {

    public static final String TOTAL = "total";

    public static final String ROWS = "rows";

    public static final String OK = "ok";

    /**
     * 登录超时或未登录
     */
    public static final String LOGIN_TIMEOUT = "登录超时或未登录";

    /**
     * 没有权限访问
     */
    public static final String NOT_PERMISSION = "没有权限访问";
    /**
     * code
     */
    public static final String CODE = "code";
    /**
     * status_code
     */
    public static final String STATUS_CODE = "status_code";
    /**
     * massage
     */
    public static final String MESSAGE = "message";
    /**
     * data
     */
    public static final String DATA = "data";
    /**
     * 请求成功
     */
    public static final Integer HS_SUCCESS = 200;


    /**
     * 服务器内部错误
     */
    public static final int HS_INTERNAL_SERVER_ERROR = 500;

    /**
     * 业务执行错误
     */
    public static final int HS_BUSINESS_ERROR = 4170;

    /**
     * 未认证
     */
    public static final int HS_UNAUTHORIZED = 401;

    /**
     * 权限不足
     */
    public static final int HS_FORBIDDEN = 403;

    /**
     * 请求过多
     */
    public static final int HS_TOO_MANY_REQUEST = 429;

    /**
     * 服务不可用
     */
    public static final int HS_SERVICE_UNAVAILABLE = 503;
    /**
     * 流程触发点不存在或未启用（审核通过）
     */
    public static final int HS_SUCCESS_530 = 530;
    /**
     * 流程模板未配置（审核通过）
     */
    public static final int HS_SUCCESS_531 = 531;
    /**
     * 当前用户角色不存在流程模板不能发起
     */
    public static final int HS_SUCCESS_532 = 532;

    /**
     * 该流程未配置节点无法创建流程（审核通过）
     */
    public static final int HS_SUCCESS_534 = 534;
    /**
     * 流程实例数据不能为空
     */
    public static final int HS_SUCCESS_535 = 535;
    /**
     * 流程实例数据缺少参数
     */
    public static final int HS_SUCCESS_536 = 536;
    /**
     * 职能部门干系人不能为空
     */
    public static final int HS_SUCCESS_537 = 537;
    /**
     * 权证部门干系人不能为空
     */
    public static final int HS_SUCCESS_538 = 538;
    /**
     * 服务部门干系人不能为空
     */
    public static final int HS_SUCCESS_539 = 539;
    /**
     * 审批节点配置了未知的部门类型，请及时处理
     */
    public static final int HS_SUCCESS_540 = 540;
    /**
     * 存在审核中的流程不能发起
     */
    public static final int HS_SUCCESS_541 = 541;

    /**
     * 状态常量 0
     */
    public static final Integer STATUS_INTEGER_0 = 0;
    /**
     * 状态常量 1
     */
    public static final Integer STATUS_INTEGER_1 = 1;
    /**
     * 状态常量 2
     */
    public static final Integer STATUS_INTEGER_2 = 2;
    /**
     * 状态常量 3
     */
    public static final Integer STATUS_INTEGER_3 = 3;
    /**
     * 状态常量 -1
     */
    public static final Byte STATUS_BYTE_F1 = -1;

    /**
     * header中存储的用户id
     */
    public static final String USER_ID = "userId";
    /**
     * 线索/商机操作记录表,新增
     */
    public static final String OPREATION_TYPE_ADD = "ADD";
    /**
     * 线索/商机操作记录表,修改
     */
    public static final String OPREATION_TYPE_UPDATE = "UPDATE";
    /**
     * 线索/商机操作记录表，线索回收池抓取
     */
    public static final String POOL_CLUE_GRAD = "POOL_CLUE_GRAD";
    /**
     * 线索/商机操作记录表，商机回收池抓取
     */
    public static final String POOL_BUSINESS_GRAD = "POOL_BUSINESS_GRAD";
    public static final String OPREATION_TYPE_BACK = "BACK";
    public static final String OPREATION_TYPE_INVALID = "INVALID";
    public static final String OPREATION_TYPE_AWAKEN = "AWAKEN";
    /**
     * 线索/商机操作记录表,删除
     */
    public static final String OPREATION_TYPE_DELETE = "DELETE";
    /**
     * 公共0
     */
    public static final Integer COMMON_INT_0 = 0;
    /**
     * 公共1
     */
    public static final Integer COMMON_INT_1 = 1;
    /**
     * 公共2
     */
    public static final Integer COMMON_INT_2 = 2;
    /**
     * 公共-2
     */
    public static final Integer COMMON_INT_NEGATIVE_2 = -2;

    /**
     * 公共3
     */
    public static final Integer COMMON_INT_3 = 3;

    /**
     * 公共4
     */
    public static final Integer COMMON_INT_4 = 4;

    /**
     * 公共8
     */
    public static final Integer COMMON_INT_8 = 8;

    /**
     * 公共9
     */
    public static final Integer COMMON_INT_9 = 9;

    /**
     * 公共-7
     */
    public static final Integer COMMON_INT_NEGATIVE_7 = -7;
    /**
     * 公共-1
     */
    public static final Integer COMMON_INT_NEGATIVE_1 = -1;

    /**
     * 跟进类型：线索
     */
    public static final byte CLUE = 1;

    /**
     * 跟进类型：商机
     */
    public static final byte BUSINESS = 2;

    /**
     * 任务状态：未完成
     */
    public static final Integer TASK_UN_FINISHED = 1;

    /**
     * 任务状态：已完成
     */
    public static final Integer TASK_FINISHED = 2;

    /**
     * 线索模板
     */
    public static final int CLUE_TEMPLATE = 1;

    /**
     * 商机模板
     */
    public static final int BUSINESS_TEMPLATE = 2;

    /***
     * Zhu ChunBo : 用户模板
     * @author : Zhu ChunBo
     * @date : 2020-11-10 20:01:14
     */
    public static final int USER_TEMPLATE = 3;
    /**
     * 商机线索表，redis 锁 key 值
     */
    public static final String LOCK_CUSTOMER_BUSINESS = "LOCK_CUSTOMER_BUSINESS";
    /**
     * 商机线索表 枷锁时间
     */
    public static final Long LOCK_CUSTOMER_BUSINESS_TIME = 10000L;
    /**
     * 联系方式  call:电话
     */
    public static final String CONNECTION_TYPE_CALL = "call";

    /**
     * 金额比较
     */
    public static final BigDecimal MONEY_COMPARE = new BigDecimal(0);

    /**
     * 客户无效
     */
    public static final int CUSTOMER_INVALID = 0;
    /**
     * 客户有效
     */
    public static final int CUSTOMER_VALID = 1;
    /**
     * 默认每页展示20条
     */
    public static final int PAGE_SIZE = 20;
    /**
     * AUTH_SERVICE:SINGLE:USER_NAME:公司id:用户id 用户名示例
     */
    public static final String AUTH_SERVICE_NAME = "AUTH_SERVICE:SINGLE:USER_NAME";

    public static final String AUTH_SERVICE_DEP_USER_NAME = "AUTH_SERVICE:SINGLE:USER_DEP_NAME";
    /**
     * CACHE_SERVICE:SINGLE:LABEL:公司id:标签id 标签名示例
     */
    public static final String CONFIG_SERVICE_LABEL = "CONFIG_SERVICE:SINGLE:LABEL_NAME";
    //跟进意向
    public static final String CONFIG_SERVICE_INTENTION = "CONFIG_SERVICE:SINGLE:FOLLOW_INTENTION";
    //客户保护
    public static final String CONFIG_SERVICE_FOCUS = "CONFIG_SERVICE:SINGLE:CUSTOMER_ATTENTION";


    /**
     * Zhu ChunBo : 话术模板
     *
     * @author : Zhu ChunBo
     * @date : 2020-11-25 15:50:34
     */
    public static final String CONFIG_SERVICE_TALK_TEMPLATE_NAME = "CONFIG_SERVICE:SINGLE:TALK_SKILL_TEMPLATE_NAME";

    /**
     * Zhu ChunBo : 客户状态
     *
     * @author : Zhu ChunBo
     * @date : 2020-11-23 16:32:40
     */
    public static final String CONFIG_SERVICE_CUSTOMER = "CONFIG_SERVICE:SINGLE:CUSTOMER_STATUS";

    /**
     * 任务类型
     */
    public static final String CONFIG_SERVICE_TASK_TYPE = "CONFIG_SERVICE:SINGLE:TASK_TYPE";

    /**
     * PERMISSION_SERVICE:SINGLE:DEPARTMENT:公司id:部门id 部门示例
     */
    public static final String PERMISSION_SERVICE_DEPARTMENT = "PERMISSION_SERVICE:SINGLE:DEPARTMENT";

    public static final String SINGLE = "SINGLE";
    public static final String USER_NAME = "USER_NAME";

    //客户状态 1 退回 2 未签单 3 签单 4 结账续贷
    //线索状态 21 终止（新增） 22 终止（删除）23 正常
    //24 转化 25 废弃
    public static final String BACK = "BS001";
    public static final String UNSIGN = "BS002";

    /**
     * 线索状态正常
     */
    public static final String NORMAL = "CS003";
    /**
     * 状态常量 0
     */
    public static final Byte STATUS_BYTE_0 = 0;

    /**
     * 状态常量 1
     */
    public static final Byte STATUS_BYTE_1 = 1;

    /**
     * 状态常量 2
     */
    public static final Byte STATUS_BYTE_2 = 2;
    /**
     * 状态常量 3
     */
    public static final Byte STATUS_BYTE_3 = 3;
    /**
     * 状态常量 4
     */
    public static final Byte STATUS_BYTE_4 = 4;
    /**
     * 状态常量 5
     */
    public static final Byte STATUS_BYTE_5 = 5;
    /**
     * 状态常量 6
     */
    public static final Byte STATUS_BYTE_6 = 6;

    /**
     * 认证服务用户名
     */
    public static final String AUTH_SERVICE_SINGLE_USER_NAME = "AUTH_SERVICE:SINGLE:USER_NAME";
    public static final Byte STATUS_BYTE_7 = 7;
    public static final Byte STATUS_BYTE_8 = 8;

    /**
     * 过滤等级-弱
     */
    public static final Byte FILTER_LEVEL_WEAK = 1;

    /**
     * 过滤等级-强
     */
    public static final Byte FILTER_LEVEL_STRONG = 2;

    /**
     * 状态常量 "0"
     */
    public static final String STR_0 = "0";

    /**
     * 状态常量 "1"
     */
    public static final String STR_1 = "1";

    /**
     * 状态常量 "2"
     */
    public static final String STR_2 = "2";

    /**
     * 状态常量 "3"
     */
    public static final String STR_3 = "3";

    /**
     * 状态常量 "4"
     */
    public static final String STR_4 = "4";

    /**
     * 标签名称缓存
     */
    public static final String LABEL_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:LABEL_NAME";
    /**
     * 标签组缓存前缀
     */
    public static final String LABEL_GROUP_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:LABEL_GROUP_NAME";

    /**
     * 职业
     */
    public static final String PROFESSION_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:PROFESSION";

    /**
     * 渠道名称缓存
     */
    public static final String CHANNEL_NAME_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:CHANNEL_NAME";

    /**
     * 配置码值缓存
     */
    public static final String DICTIONARY_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:DICTIONARY_FIELD";
    /**
     * 民族
     */
    public static final String NATION_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:NATION";

    /**
     * redis缓存认证服务
     */
    public static final String REDIS_AUTH_SERVICE_NAME = "BUSINESS_SERVICE";

    /**
     * 渠道类别缓存
     */
    public static final String CHANNEL_TYPE_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:CHANNEL_TYPE";
    /**
     * 跟进类型
     */
    public static final String FOLLOW_WAY_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:FOLLOW_WAY";

    /**
     * 贷款类型缓存
     */
    public static final String LOAN_TYPE_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:LOAN_TYPE";

    /**
     * 商机状态缓存
     */
    public static final String BUSINESS_STATUS_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:BUSINESS_STATUS";

    /**
     * 线索状态
     */
    public static final String CLUE_STATUS_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:CLUE_STATUS";

    /**
     * 任务类别
     */
    public static final String TASK_TYPE_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:TASK_TYPE";
    /**
     * 婚姻状态
     */
    public static final String MARITAL_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:MARITAL_STATUS";
    /**
     * 教育
     */
    public static final String EDUCATION_CACHE_PREFIX = "CONFIG_SERVICE:SINGLE:EDUCATION";
    /**
     * 文件类型
     */
    public static final String FILE_TYPE = "FILE_SERVICE:SINGLE:FILE_TYPE";

    /**
     * 部门名称 + 人员名称
     */
    public static final String AUTH_SERVICE_USER_DEP_NAME = "AUTH_SERVICE:SINGLE:USER_DEP_NAME";
    /**
     * 作业类型
     */
    public static final String OPERATION_TYPE = "operationType";
    /**
     * 操作符号
     */
    public static final String OPERATION_SYMBOL = "operationSymbol";
    /**
     * 操作编号键
     */
    public static final String OPERATION_NUMBER_KEY = "operationNumberKey";
    /**
     * 用户名称
     */
    public static final String AUTH_SERVICE_USER_NAME = "AUTH_SERVICE:SINGLE:USER_NAME";
    /**
     * 部门名称
     */
    public static final String PERMISSION_SERVICE_DEPT_NAME = "PERMISSION_SERVICE:SINGLE:DEPARTMENT";
    public static final String NUMBER_RULE = "FINANCE_SERVICE:NUMBER";
    /**
     * 消息类型：流程结果通知 固定值FLOW_RESULT_NOTICE
     */
    public static final String MESSAGE_TYPE_FLOW_RESULT_NOTICE = "FLOW_RESULT_NOTICE";
    /**
     * 消息类型(流程返回)
     */
    public static final String MESSAGE_TYPE = "messageType";
    /**
     * 消息类型：流程结果 触发点code
     */
    public static final String TRIGGER_POINT_CODE = "triggerPointCode";
    /**
     * 产品库-评估公司
     */
    public static final String PL_CACHE_PRODUCT_ESTIMATE = "PL_CACHE:SINGLE:PL_ESTIMATE";
    /**
     * 产品库-公证公司
     */
    public static final String PL_CACHE_PRODUCT_NOTARY = "PL_CACHE:SINGLE:PL_NOTARY";
    /**
     * 产品库贷款类型缓存
     */
    public static final String CACHE_SERVICE_PRODUCT_LOAN_TYPE = "PL_CACHE:SINGLE:PL_LOAN_TYPE";
    /**
     * 省市区
     */
    public static final String PROVINCE_CITY_DISTRICT = "CONFIG_SERVICE:SINGLE:PROVINCE_CITY_DISTRICT";
    //借款
    public static final String DAIFU = "OC003";
    //借款收回
    public static final String DAISHOU = "IC002";
    //退服务费
    public static final String RETURN_SERVICE = "OC004";
    //定金
    public static final String DINGJIN = "IC001";

    /**
     * 产品库产品缓存
     */
    public static final String CACHE_SERVICE_PRODUCT_PRODUCTS = "PL_CACHE:SINGLE:PL_PRODUCTS";
    public static final String LOAN_ORDER_SERVICE_SINGLE_ORDER_MAKE_STATUS = "LOAN_ORDER_SERVICE:SINGLE:ORDER_MAKE_STATUS";
    public static final Integer INT_ONE = 1;

    //收支科目缓存前缀
    public static final String FINANCE_SERVICE_SUBJECT_CODE = "FINANCE_SERVICE:SINGLE:SUBJECT_CODE";

    /**
     * 手动模式
     */
    public static final String TASK_MODE_TM001 = "TM001";
    /**
     * 自动模式
     */
    public static final String TASK_MODE_TM002 = "TM002";
    /**
     * 全模式
     */
    public static final String TASK_MODE_TM003 = "TM003";

    public static final String IM_OBJECT_CUSTOMER = "customer";

    public static final String IM_OBJECT_EMPLOYEE = "employee";

    /**
     * 手机号验证
     */
    public static final String TEL_MATCHES = "^1[3456789]\\d{9}$";

    public static final String NAME_MATCHES = "^[\\u4e00-\\u9fa5]{1,20}$";

    /**
     * 会话列表
     */
    public static final String MESSAGE_TYPE_CONVERSATION_LIST = "conversation_list";

    /**
     * 会话信息
     */
    public static final String MESSAGE_TYPE_CONVERSATION = "conversation";

    /**
     * 系統跟进
     */
    public static final String CONNECT_MODE_SYS_FOLLOW = "sys_follow";

    /**
     * 首页缓存key
     */
    public static final String HOME_PAGE_CHART_FOLLOW = "BUSINESS_SERVICE:HOME_PAGE_CHART:FOLLOW";
    /**
     * 会话状态
     */
    public static final String BUSINESS_CONVERSATION_STATE = "IM_SERVICE:BUSINESS_CONVERSATION_STATE";
    /**
     * 渠道类型：首电码值
     */
    public static final String CHANNEL_TYPE_AD = "CT002";
    /**
     * 渠道类型：首电码值
     */
    public static final String CHANNEL_TYPE_PF = "CT001";
    /**
     * 消息类型：通知
     */
    public static final String MESSAGE_TYPE_NOTICE = "notice";
    /**
     * 消息子类 通知的（通知:系统消息 system、任务 task、订单 order、 线索 clue、商机 business、质检 quality. 协同:流程 flow、产品 product）
     * 消息类型：线索
     */
    public static final String MESSAGE_SUB_TYPE_CLUE = "clue";
    public static final String COMPUTATION_ROLE = "CONFIG_SERVICE:SINGLE:COMPUTATION_ROLE";

    /**
     * 商机 business
     */
    public static final String MESSAGE_SUB_TYPE_BUSINESS = "business";

    /**
     * 客户 customer
     */

    public static final String MESSAGE_SUB_TYPE_CUSTOMER = "customer";
    /**
     * 客户关系：触达
     */
    public static final String CUSTOMER_RELATION_PHONE_CONTRACT = "CR000";
    /**
     * 客户关系：联系频繁
     */
    public static final String CUSTOMER_RELATION_OFTEN_CONTRACT = "CR001";
    /**
     * 客户关系：私密性
     */
    public static final String CUSTOMER_RELATION_SECRET = "CR006";
    /**
     * 客户关系：共同度
     */
    public static final String CUSTOMER_RELATION_COMMON = "CR005";
    /**
     * 客户关系：转介绍
     */
    public static final String CUSTOMER_RELATION_ZJS = "CR007";
    /**
     * 客户关系：协同
     */
    public static final String CUSTOMER_RELATION_XT = "CR002";
    /**
     * 跟进方式：上门
     */
    public static final String VISIT = "FW001";

    /**
     * 客户价值 资质大类
     */
    public static final String PL_CACHE_SINGLE_PL_QUALIFY_CATE = "PL_CACHE:SINGLE:PL_QUALIFY_CATE";

    /**
     * 跟进类型：线索key值
     */
    public static final String CLUE_NUMBER = "clue_number";

    /**
     * 跟进类型：商机key值
     */
    public static final String BUSINESS_NUMBER = "business_number";
    /**
     * 过期时间
     *
     * @Author WanChun
     * @Description
     * @Date 2021/6/16 14:38
     **/
    public static final int EXE_PRE = 24 * 60 * 60 - 4;


    public static final String ROAM_REDIS_CONDITION_KEY = "BUSINESS_SERVICE:ROAM_REDIS_CONDITION_KEY";

    /**
     * 商机线索最新来源缓存
     */
    public static final String CACHE_SERVICE_BUSINESS_CLUE_RESOURCE = "BUSINESS_SERVICE:BUSINESS_CLUE_RESOURCE";
}
